hvm: Pause domain during state save/load.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 31 May 2007 15:05:27 +0000 (16:05 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Thu, 31 May 2007 15:05:27 +0000 (16:05 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/domctl.c

index b7342fd5a4c154ff6eea3c95eb87ace78ecd9e3f..7bbd00b3b5977e75d28f88674e7f877156b2378b 100644 (file)
@@ -317,7 +317,9 @@ long arch_do_domctl(
         if ( copy_from_guest(c.data, domctl->u.hvmcontext.buffer, c.size) != 0)
             goto sethvmcontext_out;
 
+        domain_pause(d);
         ret = hvm_load(d, &c);
+        domain_unpause(d);
 
     sethvmcontext_out:
         if ( c.data != NULL )
@@ -362,7 +364,9 @@ long arch_do_domctl(
         if ( (c.data = xmalloc_bytes(c.size)) == NULL )
             goto gethvmcontext_out;
 
+        domain_pause(d);
         ret = hvm_save(d, &c);
+        domain_unpause(d);
 
         domctl->u.hvmcontext.size = c.cur;
         if ( copy_to_guest(domctl->u.hvmcontext.buffer, c.data, c.size) != 0 )